The present invention relates to protocol stacks, and more particularly to packet flow control through the protocol stack.
The Bluetooth(trademark) networking protocol is well known in the art. FIG. 1 illustrates a standard Bluetooth protocol stack. The stack 100 includes a Host Controller Interface (HCI) layer 106, a Logical Link Control and Adaptation Protocol (L2CAP) layer 108, a Telephony Control Protocol Specification (TCS) layer 110, a Service Discovery Protocol (SDP) layer 112, and a RFCOMM protocol layer 114.
The HCI layer 106 provides a command interface which accepts communications over the physical bus (not shown). The L2CAP layer 108 supports higher level protocol multiplexing, packet segmentation and reassembly, and the conveying of quality of service information.
The TCS layer 110 provides call control and signaling of voice channels. The RFCOMM protocol layer 114 provides emulation of serial ports over the L2CAP layer 108.
The SDP layer 112 provides a means for applications to discover which services are provided by or available through a device. A Bluetooth device may act as an SDP client querying services, an SDP server providing services, or both. Each service registers with the SDP server, and information concerning each service is cataloged in service records. Through the SDP layer 112, a client may send a request to the SDP server to ask what services a remote device provides. The SDP server responds with service records of the services provided by the remote device. Part of each service record is a protocol descriptor list (PDL). The PDL comprises a list of layers of the protocol stack 100 through which to route a packet for the particular service.
However, to properly route packets through the stack 100, each stack layer 106-114 requires intimate knowledge of the stack layer xe2x80x9cabovexe2x80x9d and xe2x80x9cbelowxe2x80x9d it in the protocol stack 100. Thus, when a packet is for a particular service provided either by a server or a client, each stack layer 106-114 must have a complete set of information on how to route the packet for this service. In effect, each stack layer 106-114 requires point to point information from a client application, through each layer of the stack 100, to a remote device. How a connection to the layer above or below is created and how the packet routed to it varies from layer to layer. This leads to considerable complexity in the protocol stack 100.
Accordingly, there exists a need for an improved method and system for controlling packet flow through a protocol stack. The present invention addresses such a need.
The present invention provides a method and system for controlling packet flow through a protocol stack. The method includes: receiving a packet by a layer manager, wherein the layer manager may interface with each layer of the protocol stack; determining a service associated with the packet by the layer manager; accessing a list of layers of the protocol stack for the service by the layer manager; and routing the packet to a layer of the protocol stack according to the list. The layer manager comprises a plurality of protocol descriptor lists for supported services and uses these lists to route a packet to the appropriate stack layer. In this manner, the stack layers need not have knowledge of the other layers or of the proper routing of the packet. This makes the implementation of the layers in the protocol stack easier.